package com.siyuanren.gcocp.service.impl;

import com.siyuanren.gcocp.entity.WxUserVoucher;
import com.siyuanren.gcocp.entity.WxUserVoucherExample;
import com.siyuanren.gcocp.entity.WxVoucher;
import com.siyuanren.gcocp.entity.WxVoucherExample;
import com.siyuanren.gcocp.mapper.base.WxUserVoucherMapper;
import com.siyuanren.gcocp.mapper.base.WxVoucherMapper;
import com.siyuanren.gcocp.service.VoucherService;
import com.siyuanren.gcocp.vo.QueryVoucherVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by   anxing
 * Project_name gcocp-parent
 * Path         com.siyuanren.gcocp.service.impl
 * Date         2018/6/8
 * Time         11:25
 * Description
 */
@Slf4j
@Service
public class VoucherServiceImpl implements VoucherService {
    @Autowired
    WxVoucherMapper voucherMapper;

    @Override
    @Transactional
    public int insert(WxVoucher voucher) {
        return voucherMapper.insert(voucher);
    }

    @Override
    public WxVoucher getVoucherById(Integer id) {
        return voucherMapper.selectByPrimaryKey(id);
    }
}
